package com.haoshuang.zhouzhoubang.ui.adapter

import com.chad.library.adapter4.BaseQuickAdapter
import com.haoshuang.zhouzhoubang.R
import com.haoshuang.zhouzhoubang.databinding.ItemTs3Binding
import com.haoshuang.zhouzhoubang.model.bean.TeamLike
import com.mufeng.libs.base.BaseBindingHolder
import com.mufeng.libs.base.BaseBindingQuickAdapter
import com.mufeng.libs.utils.view.load


/**
 * 订单模块中的订单列表适配器
 * */
class TsAdapter(data: MutableList<TeamLike>) :
    BaseBindingQuickAdapter<TeamLike, ItemTs3Binding>(data){

    override fun onBindViewHolder(holder: BaseBindingHolder, position: Int, item: TeamLike?) {
        val binding = ItemTs3Binding.bind(holder.itemView)
        binding.apply {
            serviceCount.text=item?.service_count.toString()
            tvName.text=item?.nickname
            tvPrice.text=item?.service_price
            tvAvatar.load(item?.avatar, R.mipmap.default_image)
        }
    }

}